#pragma once
#include <map>
#include <set>
#include <vector>
using std::map;
using std::pair;
using std::set;
using std::vector;
class NFA;
class DFA
{
    size_t state_cnt;
    size_t charset_cnt;
    map<pair<size_t, size_t>, size_t>trans;
    size_t initial_state;
    set<size_t>final_state;
public:
    DFA();
    DFA(size_t sc, size_t cc, map<pair<size_t, size_t>, size_t> tr, size_t is, set<size_t> ts);
    bool match(vector<size_t>);
    friend void NtoD(const NFA * nfa, DFA* dfa);
    friend DFA* MinDFA(const DFA* dfa);
    void print() const;
};
